<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>监控</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" th:href="@{/layuimini/lib/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/layuimini/lib/font-awesome-4.7.0/css/font-awesome.min.css}" media="all">
    <link rel="stylesheet" th:href="@{/layuimini/css/public.css}" media="all">
    <style>
        .layui-card {border:1px solid #f2f2f2;border-radius:5px;}
        .icon {margin-right:10px;color:#1aa094;}
        .icon-cray {color:#ffb800!important;}
        .icon-blue {color:#1e9fff!important;}
        .icon-tip {color:#ff5722!important;}
        .layuimini-qiuck-module {text-align:center;margin-top: 10px}
        .layuimini-qiuck-module a i {display:inline-block;width:100%;height:60px;line-height:60px;text-align:center;border-radius:2px;font-size:30px;background-color:#F8F8F8;color:#333;transition:all .3s;-webkit-transition:all .3s;}
        .layuimini-qiuck-module a cite {position:relative;top:2px;display:block;color:#666;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px;}
        .welcome-module {width:100%;height:210px;}
        .panel {margin: 5px; background-color:#fff;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}
        .panel-body {padding:10px}
        .panel-title {margin-top:0;margin-bottom:0;font-size:12px;color:inherit}
        .label {display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;margin-top: .3em;}
        .layui-red {color:red}
        .main_btn > p {height:40px;}
        .layui-bg-number {background-color:#F8F8F8;}
        .layuimini-notice:hover {background:#f6f6f6;}
        .layuimini-notice {padding:7px 16px;clear:both;font-size:12px !important;cursor:pointer;position:relative;transition:background 0.2s ease-in-out;}
        .layuimini-notice-title,.layuimini-notice-label {
            padding-right: 70px !important;text-overflow:ellipsis!important;overflow:hidden!important;white-space:nowrap!important;}
        .layuimini-notice-title {line-height:28px;font-size:14px;}
        .layuimini-notice-extra {position:absolute;top:50%;margin-top:-8px;right:16px;display:inline-block;height:16px;color:#999;}

        .top-panel {
            border: 1px solid #eceff9;
            border-radius: 5px;
            text-align: center;
        }
        .top-panel > .panel-body{
            height: 60px;
        }
        .top-panel-number{
            line-height:60px;
            font-size: 30px;
            border-right:1px solid #eceff9;
        }
        .top-panel-tips{
            line-height:30px;
            font-size: 12px
        }
    </style>
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-row">
            <div class="layui-col-md8">
                <div class="layui-row">
                    <div class="layui-col-md6">
                        <div class="layui-card">
                            <div class="layui-card-header">
                                CPU信息
                            </div>
                            <div class="layui-card-body">
                                <div class="layui-row">
                                    <div class="layui-col-md6 layui-col-sm6 layui-col-xs6">
                                        <div class="panel layui-bg-number">
                                            <div class="panel-body">
                                                <div class="panel-title">
                                                    <span class="label pull-right layui-bg-blue">实时</span>
                                                    <h5>核心数</h5>
                                                </div>
                                                <div class="panel-content">
                                                    <h1 class="no-margins" th:text="${cpu.cpuNum}">0</h1>
                                                    <small></small>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-col-md6 layui-col-sm6 layui-col-xs6">
                                        <div class="panel layui-bg-number">
                                            <div class="panel-body">
                                                <div class="panel-title">
                                                    <span class="label pull-right layui-bg-gray">实时</span>
                                                    <h5>空闲率</h5>
                                                </div>
                                                <div class="panel-content">
                                                    <h1 class="no-margins" th:text="${cpu.free + '%'}">0</h1>
                                                    <small></small>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-col-md6 layui-col-sm6 layui-col-xs6">
                                        <div class="panel layui-bg-number">
                                            <div class="panel-body">
                                                <div class="panel-title">
                                                    <span class="label pull-right layui-bg-green">实时</span>
                                                    <h5>等待率</h5>
                                                </div>
                                                <div class="panel-content">
                                                    <h1 class="no-margins" th:text="${cpu.wait + '%'}">0</h1>
                                                    <small></small>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-col-md6 layui-col-sm6 layui-col-xs6">
                                        <div class="panel layui-bg-number">
                                            <div class="panel-body">
                                                <div class="panel-title">
                                                    <span class="label pull-right layui-bg-orange">实时</span>
                                                    <h5>使用率</h5>
                                                </div>
                                                <div class="panel-content">
                                                    <h1 class="no-margins" th:text="${cpu.used + '%'}">0</h1>
                                                    <small></small>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-card">
                            <div class="layui-card-header">
                                内存监控
                            </div>
                            <div class="layui-card-body">
                                <div class="layui-row">
                                    <div class="layui-col-md6 layui-col-sm6 layui-col-xs6">

                                        <div class="panel layui-bg-green">
                                            <div class="panel-body">
                                                <div class="panel-title">空闲内存</div>
                                                <div class="panel-content" th:text="${cpu.memInfo.free + 'G'}"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-col-md6 layui-col-sm6 layui-col-xs6">

                                        <div class="panel layui-bg-cyan">
                                            <div class="panel-body">
                                                <div class="panel-title">最大内存</div>
                                                <div class="panel-content" th:text="${cpu.memInfo.total + 'G'}"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-col-md6 layui-col-sm6 layui-col-xs6">

                                        <div class="panel layui-bg-red">
                                            <div class="panel-body">
                                                <div class="panel-title">已用内存</div>
                                                <div class="panel-content" th:text="${cpu.memInfo.used + 'G'}"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-col-md6 layui-col-sm6 layui-col-xs6">

                                        <div class="panel layui-bg-orange">
                                            <div class="panel-body">
                                                <div class="panel-title">内存使用</div>
                                                <div class="panel-content"
                                                     th:text="${#numbers.formatDecimal(cpu.memInfo.used / cpu.memInfo.total * 100, 2, 2)+ '%'}"></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md12">
                        <div class="layui-card">
                            <div class="layui-card-header">磁盘信息</div>
                            <div class="layui-card-body">

                                <div class="layui-row ">

                                    <div class="layui-col-xs12 layui-col-md6" th:each="sysFile:${cpu.sysFiles}">
                                        <div class="panel layui-bg-number">
                                            <div class="panel-body">
                                                <div class="panel-title" th:text="${sysFile.typeName}">名称</div>
                                                <div class="panel-content">
                                                    <div class="layui-row layui-col-space5">
                                                        <div class="layui-col-xs12 layui-col-md12">
                                                            <div class="layui-progress layui-progress-big" lay-showpercent="true">
                                                                <div th:if="${sysFile.usage <=90}" class="layui-progress-bar" th:lay-percent="${sysFile.usage + '%'}"></div>
                                                                <div th:if="${sysFile.usage >90}" class="layui-progress-bar layui-bg-red" th:lay-percent="${sysFile.usage + '%'}"></div>
                                                            </div>
                                                            <div style="padding-left: 20px">
                                                                剩余：<span th:text="${sysFile.free}"></span>，共：<span th:text="${sysFile.total}"></span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md4">

                <div class="layui-card">
                    <div class="layui-card-header">主机信息</div>
                    <div class="layui-card-body">
                        <table class="layui-table" lay-skin="line">
                            <thead>
                            <tr>
                                <th>属性</th>
                                <th>值</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>名称</td>
                                <td th:text="${cpu.sysInfoComputerName}"></td>
                            </tr>
                            <tr>
                                <td>地址</td>
                                <td th:text="${cpu.sysInfoComputerIp}"></td>
                            </tr>
                            <tr>
                                <td>系统</td>
                                <td th:text="${cpu.sysInfoOsName}"></td>
                            </tr>
                            <tr>
                                <td>模型</td>
                                <td th:text="${cpu.sysInfoOsArch}"></td>
                            </tr>
                            <tr>
                                <td>JDK</td>
                                <td th:text="${'JDK' + cpu.jvmInfoVersion}"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script>

</script>
</body>
</html>